1. Field of the Invention
The present invention relates to a method and apparatus for recording/reproducing video data using a memory; and more particularly, managing use of the memory.
2. Brief Description of the Prior Art
Unlike ordinary continuous video cassette recorders which record every frame of video signals, some video cassette recorders such as an intermittent video recording/reproducing apparatus (e.g., a time-lapse video cassette recorder (VCR)) intermittently record frames of a real video signal. For example, a time-lapse VCR receives video signals from several video cameras or the like, and intermittently records frames of the video signal on a magnetic tape at a pre-selected regular interval. As a result, the recorder drives a loaded tape to run and stop repeatedly. These time-lapse VCRs have been used in various areas requiring long recording times such as security monitoring systems in banks and museums.
As shown in FIG. 1, the conventional time-lapse video cassette recorder comprises a video decoder 100 which extracts a luminance signal (Y) and chrominance signal (C) from the composite analog video signals from external cameras and converts them into the digital video signals respectively; a video compressor 200 which compresses the converted digital video signals; a memory 300 in which the compressed video data are stored sequentially; a data compressor 400 which decompresses the digital video data read out from the memory 300; a bus 902 which allows communication between the compressor 200, the memory 300, and the de-compressor 400; a video encoder 500 which reconverts the decompressed digital video signals into the luminance signal and chrominance signal and synthesizes these signals into a composite analog video signal; a digital signal processor (DSP) 600 for processing digital signals in the course of compression, decompression, and memory reading/writing operations; a recording/reproducing unit 800 which records the reconverted composite analog video signals on a storage media such a magnetic tape and reproduces the recorded video signals from the storage media; and a controller 700 which supervises the aforementioned overall functions.
Furthermore, as shown in FIG. 1, the recording/reproducing unit 800 comprises a reproducing unit 810 which reproduces the signals modulated for recording on the magnetic tape; a deck 820 which drives mechanical elements and runs the magnetic tape forward or backward; and a recording unit 830 which records the composite analog video signals on the magnetic tape.
In addition, two switches designated SW1 and SW2 are shown in FIG. 1 and they change their signal path depending upon the mode set by the controller 700.
As shown in FIG. 2, the memory 300 comprises a buffer memory 310, which stores the compressed video data temporarily, and a frame memory 320, which sequentially receives the video data stored temporarily in the buffer memory 310, stores the video data, and then sends the video data to the decompressor 400 via the buffer memory 310 and the bus 902 when the number of frames of video signals sequentially stored in the frame memory 320 equals its maximum storage capacity.
The method for reproducing the intermittently recorded video signals with the time-lapse video cassette recorder configured as above is explained below in detail with reference to FIGS. 1 and 2. When a user inputs a time-lapse mode reproduction command, the controller 700 drives the deck 820 to pull out a tape into a loading state. After the tape is loaded, the deck 820 runs the magnetic tape at normal speed, which means to travel forward a frame-distance in one second, while the reproducing unit 810 reproduces the video signals recorded on the tape. In this case, the distance the magnetic tape is moved for reproducing depends on the storage capacity of the memory 300.
The video decoder 100 separates the reproduced composite analog video signal into the luminance component signal (Y) and the chrominance component signal (U, V). The separated component signals are sampled, converted into digital data streams, and then sent to the video compressor 200.
Under the control of the DSP 600, each of video signals converted into a digital data stream is processed according to a predetermined compression algorithm by the video compressor 200. The compressed digital data streams are stored sequentially in the frame memory 320 on a frame-by-frame basis via the buffer memory 310.
When the number of frames sequentially stored in the field memory 320 reaches the maximum storage capacity of the memory 320, the digital video signals stored in the frame memory 320 are read frame-by-frame, under the control of the DSP 600 as controlled by the controller 700, at a regular interval according to the time lapse mode present by the user. The digital video signals read out are decompressed and restored to their original size, and then transmitted to the encoder 500 by the decompressor 400.
Furthermore, the controller 700 controls the video encoder 500 to synthesize the luminance and chrominance component signals of the decompressed digital video streams into a composite analog video signal, which is the same as the composite video signal received from an external video camera. At the same time, the controller 700 controls the switch SW2 to change the signal path from recording connection to reproducing connection, therefore the exterior monitor displays the video signals at the regular interval.
On the other hand, when the amount of data to be read in the frame memory 320 becomes less than or equal to a predetermined threshold value in the course of reading data from the frame memory 320, the controller 700 controls the recording/reproducing unit 800 to start reproducing the recorded signal next to the signal last reproduced. The video data streams converted from this newly reproduced signal are buffered in the buffer memory 310. When the reading of data stored in the frame memory 320 is complete, the data stream buffered in the buffer memory 310 is transmitted into the frame memory 320 and is read out again. As long as the buffer memory 310 is large enough, the above explained method makes it possible to eliminate the delay time which could occur between successive reproducing steps.
Furthermore, the video cassette recorder configured as above can accomplish backward reproducing of the recorded video signals through almost the same procedure. The backward reproduction (i.e., replay in reverse) process further includes the following steps. The controller 700 drives the deck 820 to move the tape in reverse at first. After backward movement, the tape is driven to move forward while the recorded signal is reproduced and stored in the memory 300. These steps are then repeated with each rewinding of the tape positioning the tape so the next set of reproduced frames are earlier in time than the previously reproduced set of frames. In backward reproduction, the tape cannot be reproduced while driven in reverse and produce digital video data representing replay in reverse.
In the case of intermittent recording of the video signals received from the external cameras using the time-lapse video cassette recorder configured as in FIG. 1, the video signals being received are buffered in real time in the buffer memory 310, and the buffered video signals are intermittently selected at a specific interval in units of a frame, and then transferred into the frame memory 320. When the amount of frames sequentially stored in the frame memory 320 reaches a maximum storage capacity of the frame memory 320, the controller 700 controls the DSP 600 to output the stored video signal consisting of luminance and chrominance components to the video encoder 500, and to cause the video encoder 500 to synthesize the two signal components into the composite analog video signal. The reading/reproducing unit 800 records the synthesized composite video signals while driving the tape forward.
The video signals received in the recording mode are temporarily stored in the buffer memory 310, and the buffer memory 310 becomes full when 150 frames of video signals are stored. At the same time that the buffer memory 310 becomes full, the recording of 150 frames in the frame memory 320 is completed. Then, the buffered video signals are selected intermittently every several frames, and the selected frames are transferred into the frame memory 320 again.
Unlike the forward and backward reproducing mode, in the recording mode the video signals are stored in the frame memory 320 intermittently, read continuously in real time and then recorded on the magnetic tape. While the video signals are being recorded, the video signals received from the external video cameras are stored in the buffer memory 310 temporarily.
However, with the time-lapse video cassette recorder containing the memory configured as above, the recording and reproducing method has a high cost because two memories 310 and 320 are used for buffering the video signal, and the frame memory 320, which can store video signals frame-by-frame, is expensive.
Furthermore, in the case of the time-lapse video cassette recorder containing the memory configured as above, if the amount of data to be read becomes less than or equal to the preset threshold value in forward or backward reproduction of the video data written in the frame memory 320, then (1) the reproducing unit 810 should reproduce the video signals next to the video data stored in the frame memory 320 and (2) the reproduced video should be stored in the buffer memory 310 in advance to display the reproduced video image with no delay. Therefore, in the event that the preset threshold value requires a small amount of data to be read (D1 in FIG. 3A) before starting the next reproduction as shown in FIG. 3A and if the user reduces the display time interval between frames, from, for example, 72 hours mode(=36/30 sec) to 36 hours mode(=18/30 sec), the time required to reproduce the remaining data is cut in half. Such a change might cause the reproduction of the video signals stored in the frame memory 320 to complete before the next amount of video data has been reproduced and stored in the buffer memory 310. The above explained method has a problem in that reproduction may be delayed till the next amount of video data is reproduced and buffered in the buffer memory 310.
In addition, in contrast to the above case, if the preset threshold value causes the next reproduction to start when there remains a large amount of data to be read, the above method does not suffer the time delay problem. However, if the user changes between forward and backward reproduction frequently, the deck 820 overruns. This overrunning problem will be described with respect to FIG. 3B.
Referring to FIG. 3B if the amount of data to be reproduced is less than or equal to the preset threshold value D2 during the first forward reproduction, then the controller 700 controls the deck 820 to reproduce the next video signals and the video signals reproduced by the reproducing unit 810 are stored in the buffer memory 310. In this case, if the user inputs a backward reproduction command before the forward reproduction is completed as shown in FIG. 3B then the controller 700 begins to control the deck 820 for backward reproduction. As in the forward reproduction, if the amount of data to be reproduced is less than or equal to the preset value D2 during the backward reproduction, then the controller 700 controls the deck 820 to reproduce the next video signals, which have been reproduced just before, and the reproduced video signals are temporarily stored in the buffer memory 310.
Therefore, when a user alternates between a forward and a backward reproduction mode, if the interval (T) during which the deck 820 does reproduce and buffer the next video signals is short, as shown in FIG. 3B, then the deck 820 must drive to change the rotation force of the capstan motor, run the magnetic tape and stop it repeatedly. Thus, the conventional method explained above has the problem that the deck 820 overruns. As a result, the life of the capstan motor is significantly decreased.
The reading of video data from and the writing of video data to a memory of the recording/reproducing apparatus are controlled by a controller to prevent interference between the read and write operations. When recording video data, the video data is written to the memory at a periodic interval, and the video data is read from the memory between the points in time when the video data is written. The read video data is then recorded on a recording medium
When video data is reproduced, the reproduced video data is written to the memory. Reading of the reproduced video data from the memory occurs at a periodic interval. Between points in time when the reproduced data is read, further reproduced video data is written to the memory. In a backward reproduction mode, the video data is read in an order opposite to the order in which the reproduced video data was written.
Through memory management as discussed above, an address conflict between the reading and writing of video data does not occur. Furthermore, because of the memory management, a single port memory can be used. A single port memory costs significantly less than a dual port memory or multiple dual port memories and a frame memory.